home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / linux / atari / source / source.lzh / atari-linux-0.01pl3 / m68k / gensyms.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  1.8 KB  |  46 lines

  1. #include <linux/sched.h>
  2. #include <linux/bootinfo.h>
  3.  
  4. #define offsetof(type, member) ((size_t)(&((type *)0)->member))
  5.  
  6. void printf (const char *fmt, ...);
  7.  
  8. int main(void)
  9. {
  10.     printf ("LTS_STATE = %d\n", offsetof (struct task_struct, state));
  11.     printf ("LTS_COUNTER = %d\n", offsetof (struct task_struct, counter));
  12.     printf ("LTS_PRIORITY = %d\n", offsetof (struct task_struct, priority));
  13.     printf ("LTS_SIGNAL = %d\n", offsetof (struct task_struct, signal));
  14.     printf ("LTS_BLOCKED = %d\n", offsetof (struct task_struct, blocked));
  15.     printf ("LTS_FLAGS = %d\n", offsetof (struct task_struct, flags));
  16.     printf ("LTS_ERRNO = %d\n", offsetof (struct task_struct, errno));
  17.     printf ("LTS_KSTACK = %d\n", offsetof (struct task_struct, kernel_stack_page));
  18.     printf ("LTS_TSS = %d\n", offsetof (struct task_struct, tss));
  19.  
  20.     printf ("LTSS_REGS = %d\n", offsetof (struct m68k_struct, regs));
  21.     printf ("LTSS_SR = %d\n", offsetof (struct m68k_struct, sr));
  22.     printf ("LTSS_FS = %d\n", offsetof (struct m68k_struct, fs));
  23.     printf ("LTSS_CRP = %d\n", offsetof (struct m68k_struct, crp));
  24.     printf ("LTSS_FPREGS = %d\n", offsetof (struct m68k_struct, fpregs));
  25.     printf ("LTSS_FPCNTL = %d\n", offsetof (struct m68k_struct, fpcntl));
  26.     printf ("LTSS_FPSTATE = %d\n", offsetof (struct m68k_struct, fpstate));
  27.  
  28.     printf ("LKSTART_ADDR = %d\n", KSTART_ADDR);
  29.     printf ("LFLUSH_I_AND_D = %d\n", FLUSH_I_AND_D);
  30.     printf ("LPAGE_PRESENT = %d\n", PAGE_PRESENT);
  31.     printf ("LPAGE_CACHE040 = %d\n", PAGE_CACHE040);
  32.     printf ("LPAGE_SIZE = %ld\n", PAGE_SIZE);
  33.  
  34.     /* boot_info structure field offsets */
  35.     printf ("LBI_MACH = %d\n",
  36.         offsetof (struct bootinfo, machtype));
  37.     printf ("LBI_CPU = %d\n",
  38.         offsetof (struct bootinfo, cputype));
  39.     printf ("LBI_AMIGA_ECLK = %d\n",
  40.         offsetof (struct bootinfo, bi_amiga.eclock));
  41.  
  42.     printf ("LMACH_AMIGA = %d\n",MACH_AMIGA);
  43.  
  44.     return 0;
  45. }
  46.